﻿namespace DimensionsHelper.LanguageService.Syntax;

/// <summary>
///     IBM Data Collection 脚本语法类型。
/// </summary>
public enum SyntaxKinds
{
    /// <summary>
    ///     未知字符
    /// </summary>
    [Token("Unknown")]
    Unknown,

    /// <summary>
    ///     文件结束标记。
    /// </summary>
    [Token("EOF")]
    Eof,

    /// <summary>
    ///     左圆括号
    /// </summary>
    [Token("(")]
    [Punctuation(PunctuationContexts.All)]
    LeftParenthesisToken,

    /// <summary>
    ///     右圆括号
    /// </summary>
    [Token(")")]
    [Punctuation(PunctuationContexts.All)]
    RightParenthesisToken,

    /// <summary>
    ///     左方括号
    /// </summary>
    [Token("[")]
    [Punctuation(PunctuationContexts.All)]
    LeftBracketToken,

    /// <summary>
    ///     右方括号
    /// </summary>
    [Token("]")]
    [Punctuation(PunctuationContexts.All)]
    RightBracketToken,

    /// <summary>
    ///     左花括号
    /// </summary>
    [Token("{")]
    [Punctuation(PunctuationContexts.All)]
    LeftCurlyToken,

    /// <summary>
    ///     右花括号
    /// </summary>
    [Token("}")]
    [Punctuation(PunctuationContexts.All)]
    RightCurlyToken,

    /// <summary>
    ///     尖号(^)
    /// </summary>
    [Token("^")]
    [Punctuation(PunctuationContexts.All)]
    CaretToken,

    /// <summary>
    ///     点(.)
    /// </summary>
    [Token(".")]
    [Punctuation(PunctuationContexts.Script)]
    DotToken,

    /// <summary>
    ///     两个连续的点(..)
    /// </summary>
    [Token("..")]
    [Punctuation(PunctuationContexts.Categorical | PunctuationContexts.OnNextCaseEvent)]
    DotDotToken,

    /// <summary>
    ///     三个连续的点(...)
    /// </summary>
    [Token("...")]
    [Punctuation(PunctuationContexts.Preprocessor)]
    DotDotDotToken,

    /// <summary>
    ///     逗号(,)
    /// </summary>
    [Token(",")]
    [Punctuation(PunctuationContexts.All)]
    CommaToken,

    /// <summary>
    ///     分号(;)
    /// </summary>
    [Token(";")]
    [Punctuation(PunctuationContexts.Metadata)]
    SemicolonToken,

    /// <summary>
    ///     冒号(:)
    /// </summary>
    [Token(":")]
    [Punctuation(PunctuationContexts.NotPreprocessor)]
    ColonToken,

    /// <summary>
    ///     双链接符(&&)
    /// </summary>
    [Token("&&")]
    [Operator(Priority = 1, Context = OperatorContexts.Preprocessor,
        Kind = OperatorKind.Binary | OperatorKind.Logical)]
    AmpersandAmpersandToken,

    /// <summary>
    ///     双竖线(||)
    /// </summary>
    [Token("||")]
    [Operator(Priority = 1, Context = OperatorContexts.Preprocessor,
        Kind = OperatorKind.Binary | OperatorKind.Logical)]
    BarBarToken,

    /// <summary>
    ///     感叹号等号(!=)
    /// </summary>
    [Token("!=")]
    [Operator(Priority = 1, Context = OperatorContexts.Preprocessor,
        Kind = OperatorKind.Binary | OperatorKind.Compare)]
    ExclamationEqualToken,

    /// <summary>
    ///     感叹号(!)
    /// </summary>
    [Token("!")]
    [Operator(Priority = 5, Context = OperatorContexts.Preprocessor, Kind = OperatorKind.Unary)]
    ExclamationToken,

    /// <summary>
    ///     两个等号(==)
    /// </summary>
    [Token("==")]
    [Operator(Priority = 2, Context = OperatorContexts.Preprocessor,
        Kind = OperatorKind.Binary | OperatorKind.Compare)]
    EqualEqualToken,

    /// <summary>
    ///     加号(+)
    /// </summary>
    [Token("+")]
    [Operator(Priority = 3, Context = OperatorContexts.All, Kind = OperatorKind.Binary | OperatorKind.Compute)]
    PlusToken,

    /// <summary>
    ///     减号(-)
    /// </summary>
    [Token("-")]
    [Operator(Priority = 3, Context = OperatorContexts.All, Kind = OperatorKind.Both | OperatorKind.Compute)]
    MinusToken,

    /// <summary>
    ///     等号(=)
    /// </summary>
    [Token("=")]
    [Operator(Priority = 2, Context = OperatorContexts.Script, Kind = OperatorKind.Binary | OperatorKind.Compare)]
    EqualToken,

    /// <summary>
    ///     取余(Mod)
    /// </summary>
    [Operator(Priority = 4, Context = OperatorContexts.Script, Kind = OperatorKind.Binary | OperatorKind.Compute)]
    [Keyword("Mod", KeywordContexts.Mrs)]
    ModKeywordToken,

    /// <summary>
    ///     除号(/)
    /// </summary>
    [Operator(Priority = 4, Context = OperatorContexts.All, Kind = OperatorKind.Binary | OperatorKind.Compute)]
    [Token("/")]
    SlashToken,

    /// <summary>
    ///     乘号(*)
    /// </summary>
    [Operator(Priority = 4, Context = OperatorContexts.All, Kind = OperatorKind.Binary | OperatorKind.Compute)]
    [Token("*")]
    AsteriskToken,

    /// <summary>
    ///     等于乘号(=*)
    /// </summary>
    [Operator(Priority = 2, Context = OperatorContexts.Script)]
    [Token("=*")]
    EqualAsteriskToken,

    /// <summary>
    ///     大于号(&gt;)
    /// </summary>
    [Operator(Priority = 2, Context = OperatorContexts.All, Kind = OperatorKind.Binary | OperatorKind.Compare)]
    [Token(">")]
    GreaterToken,

    /// <summary>
    ///     大于等于号(&gt;=)
    /// </summary>
    [Operator(Priority = 2, Context = OperatorContexts.All, Kind = OperatorKind.Binary | OperatorKind.Compare)]
    [Token(">=")]
    GreaterEqualToken,

    /// <summary>
    ///     小于号(&lt;)
    /// </summary>
    [Operator(Priority = 2, Context = OperatorContexts.All, Kind = OperatorKind.Binary | OperatorKind.Compare)]
    [Token("<")]
    LessToken,

    /// <summary>
    ///     小于等于号(&lt;=)
    /// </summary>
    [Operator(Priority = 2, Context = OperatorContexts.All, Kind = OperatorKind.Binary | OperatorKind.Compare)]
    [Token("<=")]
    LessEqualToken,

    /// <summary>
    ///     不等于号(&lt;&gt;)
    /// </summary>
    [Operator(Priority = 2, Context = OperatorContexts.All, Kind = OperatorKind.Binary | OperatorKind.Compare)]
    [Token("<>")]
    NotEqualToken,

    /// <summary>
    ///     元数据脚本中使用的文档级别符号(\\.)
    /// </summary>
    [Punctuation(PunctuationContexts.Metadata)]
    [Token("\\\\.")]
    BackSlashBackSlashDotToken,

    /// <summary>
    ///     单个井号 (#)
    /// </summary>
    [Punctuation(PunctuationContexts.Preprocessor)]
    [Token("#")]
    HashToken,

    /// <summary>
    ///     两个井号 (##)
    /// </summary>
    [Punctuation(PunctuationContexts.Preprocessor)]
    [Token("##")]
    HashHashToken,

    // 关键字类型

    /// <summary>
    ///     Paper 关键字
    /// </summary>
    [Keyword("Paper", KeywordContexts.Mrs)]
    PaperKeywordToken,

    /// <summary>
    ///     Routing 关键字
    /// </summary>
    [Keyword("Routing", KeywordContexts.Dms)]
    RoutingKeywordToken,

    /// <summary>
    ///     On 关键字
    /// </summary>
    [Keyword("On", KeywordContexts.Mrs)]
    OnKeywordToken,

    /// <summary>
    ///     Error 关键字
    /// </summary>
    [Keyword("Error", KeywordContexts.Mrs)]
    ErrorKeywordToken,

    /// <summary>
    ///     Resume 关键字
    /// </summary>
    [Keyword("Resume", KeywordContexts.Mrs)]
    ResumeKeywordToken,

    /// <summary>
    ///     Option 关键字
    /// </summary>
    [Keyword("Option", KeywordContexts.Mrs)]
    OptionKeywordToken,

    /// <summary>
    ///     Implicit 关键字
    /// </summary>
    [Keyword("Implicit", KeywordContexts.Mrs)]
    ImplicitKeywordToken,

    /// <summary>
    ///     Explicit 关键字
    /// </summary>
    [Keyword("Explicit", KeywordContexts.Mrs)]
    ExplicitKeywordToken,

    /// <summary>
    ///     GlobalVariables 关键字
    /// </summary>
    [Keyword("GlobalVariables", KeywordContexts.Mrs)]
    GlobalVariablesKeywordToken,

    /// <summary>
    ///     Dim 关键字
    /// </summary>
    [Keyword("Dim", KeywordContexts.Mrs)]
    DimKeywordToken,

    /// <summary>
    ///     Const 关键字
    /// </summary>
    [Keyword("Const", KeywordContexts.Mrs)]
    ConstKeywordToken,

    /// <summary>
    ///     Function 关键字
    /// </summary>
    [Keyword("Function", KeywordContexts.Mrs)]
    FunctionKeywordToken,

    /// <summary>
    ///     Sub 关键字
    /// </summary>
    [Keyword("Sub", KeywordContexts.Mrs)]
    SubKeywordToken,

    /// <summary>
    ///     True 关键字
    /// </summary>
    [Keyword("True",
        KeywordContexts.Mrs | KeywordContexts.Metadata | KeywordContexts.Preprocessor |
        KeywordContexts.Declaration)]
    TrueKeywordToken,

    /// <summary>
    ///     False 关键字
    /// </summary>
    [Keyword("False",
        KeywordContexts.Mrs | KeywordContexts.Metadata | KeywordContexts.Preprocessor |
        KeywordContexts.Declaration)]
    FalseKeywordToken,

    /// <summary>
    ///     Null 关键字
    /// </summary>
    [Keyword("Null",
        KeywordContexts.Mrs | KeywordContexts.Metadata | KeywordContexts.Preprocessor |
        KeywordContexts.Declaration)]
    NullKeywordToken,

    /// <summary>
    ///     Set 关键字
    /// </summary>
    [Keyword("Set", KeywordContexts.Mrs)]
    SetKeywordToken,

    /// <summary>
    ///     End 关键字
    /// </summary>
    [Keyword("End", KeywordContexts.Mrs | KeywordContexts.Dms | KeywordContexts.Declaration)]
    EndKeywordToken,

    /// <summary>
    ///     Exit 关键字
    /// </summary>
    [Keyword("Exit", KeywordContexts.Mrs)]
    ExitKeywordToken,

    /// <summary>
    ///     Goto 关键字
    /// </summary>
    [Keyword("GoTo", KeywordContexts.Mrs)]
    GotoKeywordToken,

    /// <summary>
    ///     Is 关键字
    /// </summary>
    [Operator(Priority = 5, Context = OperatorContexts.Script, Kind = OperatorKind.Binary)]
    [Keyword("Is", KeywordContexts.Mrs)]
    IsKeywordToken,

    /// <summary>
    ///     Like 关键字
    /// </summary>
    [Operator(Priority = 3, Context = OperatorContexts.Script, Kind = OperatorKind.Binary)]
    [Keyword("Like", KeywordContexts.Mrs)]
    [Token("Like")]
    LikeKeywordToken,

    /// <summary>
    ///     And 关键字
    /// </summary>
    [Operator(Priority = 1, Context = OperatorContexts.All, Kind = OperatorKind.Binary | OperatorKind.Logical)]
    [Keyword("And", KeywordContexts.Mrs | KeywordContexts.Preprocessor)]
    AndKeywordToken,

    /// <summary>
    ///     Or 关键字
    /// </summary>
    [Operator(Priority = 1, Context = OperatorContexts.All, Kind = OperatorKind.Binary | OperatorKind.Logical)]
    [Keyword("Or", KeywordContexts.Mrs | KeywordContexts.Preprocessor)]
    OrKeywordToken,

    /// <summary>
    ///     Xor 关键字
    /// </summary>
    [Operator(Priority = 1, Context = OperatorContexts.All, Kind = OperatorKind.Binary | OperatorKind.Logical)]
    [Keyword("Xor", KeywordContexts.Mrs | KeywordContexts.Preprocessor)]
    XorKeywordToken,

    /// <summary>
    ///     Not 关键字
    /// </summary>
    [Operator(Priority = 5, Context = OperatorContexts.All, Kind = OperatorKind.Unary)]
    [Keyword("Not", KeywordContexts.Mrs | KeywordContexts.Preprocessor)]
    NotKeywordToken,

    /// <summary>
    ///     If 关键字
    /// </summary>
    [Keyword("If", KeywordContexts.Mrs)]
    IfKeywordToken,

    /// <summary>
    ///     Then 关键字
    /// </summary>
    [Keyword("Then", KeywordContexts.Mrs)]
    ThenKeywordToken,

    /// <summary>
    ///     ElseIf 关键字
    /// </summary>
    [Keyword("ElseIf", KeywordContexts.Mrs)]
    ElseIfKeywordToken,

    /// <summary>
    ///     Else 关键字
    /// </summary>
    [Keyword("Else", KeywordContexts.Mrs)]
    ElseKeywordToken,

    /// <summary>
    ///     For 关键字
    /// </summary>
    [Keyword("For", KeywordContexts.Mrs)]
    ForKeywordToken,

    /// <summary>
    ///     To 关键字
    /// </summary>
    [Keyword("To", KeywordContexts.Mrs)]
    ToKeywordToken,

    /// <summary>
    ///     Step 关键字
    /// </summary>
    [Keyword("Step", KeywordContexts.Mrs)]
    StepKeywordToken,

    /// <summary>
    ///     In 关键字
    /// </summary>
    [Keyword("In", KeywordContexts.Mrs)]
    InKeywordToken,

    /// <summary>
    ///     Each 关键字
    /// </summary>
    [Keyword("Each", KeywordContexts.Mrs)]
    EachKeywordToken,

    /// <summary>
    ///     Next 关键字
    /// </summary>
    [Keyword("Next", KeywordContexts.Mrs)]
    NextKeywordToken,

    /// <summary>
    ///     While 关键字
    /// </summary>
    [Keyword("While", KeywordContexts.Mrs)]
    WhileKeywordToken,

    /// <summary>
    ///     Do 关键字
    /// </summary>
    [Keyword("Do", KeywordContexts.Mrs)]
    DoKeywordToken,

    /// <summary>
    ///     Loop 关键字
    /// </summary>
    [Keyword("Loop", KeywordContexts.Mrs)]
    LoopKeywordToken,

    /// <summary>
    ///     Until 关键字
    /// </summary>
    [Keyword("Until", KeywordContexts.Mrs)]
    UntilKeywordToken,

    /// <summary>
    ///     Select 关键字
    /// </summary>
    [Keyword("Select", KeywordContexts.Mrs)]
    SelectKeywordToken,

    /// <summary>
    ///     Case 关键字
    /// </summary>
    [Keyword("Case", KeywordContexts.Mrs)]
    CaseKeywordToken,

    /// <summary>
    ///     With 关键字
    /// </summary>
    [Keyword("With", KeywordContexts.Mrs)]
    WithKeywordToken,

    /// <summary>
    ///     Section 关键字
    /// </summary>
    [Keyword("Section", KeywordContexts.Mrs)]
    SectionKeywordToken,

    // Dms 关键字

    /// <summary>
    ///     Job 关键字
    /// </summary>
    [Keyword("Job", KeywordContexts.Dms)]
    JobKeywordToken,

    /// <summary>
    ///     InputDataSource 关键字
    /// </summary>
    [Keyword("InputDataSource", KeywordContexts.Dms)]
    InputDataSourceKeywordToken,

    /// <summary>
    ///     OutputDataSource 关键字
    /// </summary>
    [Keyword("OutputDataSource", KeywordContexts.Dms)]
    OutputDataSourceKeywordToken,

    /// <summary>
    ///     GlobalSqlVariables 关键字
    /// </summary>
    [Keyword("GlobalSqlVariables", KeywordContexts.Dms)]
    GlobalSqlVariablesKeywordToken,

    /// <summary>
    ///     Metadata 关键字
    /// </summary>
    [Keyword("Metadata", KeywordContexts.Dms)]
    MetadataKeywordToken,

    /// <summary>
    ///     Logging 关键字
    /// </summary>
    [Keyword("Logging", KeywordContexts.Dms)]
    LoggingKeywordToken,

    /// <summary>
    ///     Event 关键字
    /// </summary>
    [Keyword("Event", KeywordContexts.Dms)]
    EventKeywordToken,

    // Declare 关键字

    /// <summary>
    ///     As 关键字
    /// </summary>
    [Keyword("As", KeywordContexts.Declaration)]
    AsKeywordToken,

    /// <summary>
    ///     Enum 关键字
    /// </summary>
    [Keyword("Enum", KeywordContexts.Declaration)]
    EnumKeywordToken,

    /// <summary>
    ///     Module 关键字
    /// </summary>
    [Keyword("Module", KeywordContexts.Declaration)]
    ModuleKeywordToken,

    /// <summary>
    ///     Interface 关键字
    /// </summary>
    [Keyword("Interface", KeywordContexts.Declaration)]
    InterfaceKeywordToken,

    /// <summary>
    ///     Class 关键字
    /// </summary>
    [Keyword("Class", KeywordContexts.Declaration)]
    ClassKeywordToken,

    /// <summary>
    ///     Implements 关键字
    /// </summary>
    [Keyword("Implements", KeywordContexts.Declaration)]
    ImplementsKeywordToken,

    /// <summary>
    ///     Inherits 关键字
    /// </summary>
    [Keyword("Inherits", KeywordContexts.Declaration)]
    InheritsKeywordToken,

    /// <summary>
    ///     Property 关键字
    /// </summary>
    [Keyword("Property", KeywordContexts.Declaration)]
    PropertyKeywordToken,

    /// <summary>
    ///     ParamArray 关键字
    /// </summary>
    [Modifier("ParamArray", KeywordContexts.Declaration)]
    ParamArrayKeywordToken,

    /// <summary>
    ///     Nullable 关键字
    /// </summary>
    [Modifier("Nullable", KeywordContexts.Declaration)]
    NullableKeywordToken,

    /// <summary>
    ///     ReadOnly 关键字
    /// </summary>
    [Modifier("ReadOnly", KeywordContexts.Declaration)]
    ReadOnlyKeywordToken,

    /// <summary>
    ///     WriteOnly 关键字
    /// </summary>
    [Modifier("WriteOnly", KeywordContexts.Declaration)]
    WriteOnlyKeywordToken,

    /// <summary>
    ///     Optional 关键字
    /// </summary>
    [Modifier("Optional", KeywordContexts.Declaration)]
    OptionalKeywordToken,

    /// <summary>
    ///     Default 关键字
    /// </summary>
    [Modifier("Default", KeywordContexts.Declaration)]
    DefaultKeywordToken,


    // Metadata 关键字

    /// <summary>
    ///     style 关键字
    /// </summary>
    [Keyword("style", KeywordContexts.Metadata)]
    StyleKeywordToken,

    /// <summary>
    ///     labelstyle 关键字
    /// </summary>
    [Keyword("labelstyle", KeywordContexts.Metadata)]
    LabelStyleKeywordToken,

    /// <summary>
    ///     templates 关键字
    /// </summary>
    [Keyword("templates", KeywordContexts.Metadata)]
    TemplatesKeywordToken,

    /// <summary>
    ///     long 关键字
    /// </summary>
    [Keyword("long", KeywordContexts.Metadata)]
    LongKeywordToken,

    /// <summary>
    ///     double 关键字
    /// </summary>
    [Keyword("double", KeywordContexts.Metadata)]
    DoubleKeywordToken,

    /// <summary>
    ///     text 关键字
    /// </summary>
    [Keyword("text", KeywordContexts.Metadata)]
    TextKeywordToken,

    /// <summary>
    ///     date 关键字
    /// </summary>
    [Keyword("date", KeywordContexts.Metadata)]
    DateKeywordToken,

    /// <summary>
    ///     boolean 关键字
    /// </summary>
    [Keyword("boolean", KeywordContexts.Metadata)]
    BooleanKeywordToken,

    /// <summary>
    ///     categorical 关键字
    /// </summary>
    [Keyword("categorical", KeywordContexts.Metadata)]
    CategoricalKeywordToken,

    /// <summary>
    ///     define 关键字
    /// </summary>
    [Keyword("define", KeywordContexts.Metadata)]
    DefineKeywordToken,

    /// <summary>
    ///     info 关键字
    /// </summary>
    [Keyword("info", KeywordContexts.Metadata)]
    InfoKeywordToken,

    /// <summary>
    ///     compound 关键字
    /// </summary>
    [Keyword("compound", KeywordContexts.Metadata)]
    CompoundKeywordToken,

    /// <summary>
    ///     block 关键字
    /// </summary>
    [Keyword("block", KeywordContexts.Metadata)]
    BlockKeywordToken,

    /// <summary>
    ///     page 关键字
    /// </summary>
    [Keyword("page", KeywordContexts.Metadata)]
    PageKeywordToken,

    /// <summary>
    ///     db 关键字
    /// </summary>
    [Keyword("db", KeywordContexts.Metadata)]
    DbKeywordToken,

    /// <summary>
    ///     codes 关键字
    /// </summary>
    [Keyword("codes", KeywordContexts.Metadata)]
    CodesKeywordToken,

    /// <summary>
    ///     expression 关键字
    /// </summary>
    [Keyword("expression", KeywordContexts.Metadata)]
    ExpressionKeywordToken,

    /// <summary>
    ///     deriveelements 关键字
    /// </summary>
    [Keyword("deriveelements", KeywordContexts.Metadata)]
    DeriveElementsKeywordToken,

    /// <summary>
    ///     noderiveelements 关键字
    /// </summary>
    [Keyword("noderiveelements", KeywordContexts.Metadata)]
    NoDeriveElementsKeywordToken,

    /// <summary>
    ///     validation 关键字
    /// </summary>
    [Keyword("validation", KeywordContexts.Metadata)]
    ValidationKeywordToken,

    /// <summary>
    ///     initialanswer 关键字
    /// </summary>
    [Keyword("initialanswer", KeywordContexts.Metadata)]
    InitialAnswerKeywordToken,

    /// <summary>
    ///     defaultanswer 关键字
    /// </summary>
    [Keyword("defaultanswer", KeywordContexts.Metadata)]
    DefaultAnswerKeywordToken,

    /// <summary>
    ///     nocasedata 关键字
    /// </summary>
    [Keyword("nocasedata", KeywordContexts.Metadata)]
    NoCaseDataKeywordToken,

    /// <summary>
    ///     unversioned 关键字
    /// </summary>
    [Keyword("unversioned", KeywordContexts.Metadata)]
    UnversionedKeywordToken,

    /// <summary>
    ///     versioned 关键字
    /// </summary>
    [Keyword("versioned", KeywordContexts.Metadata)]
    VersionedKeywordToken,

    /// <summary>
    ///     axis 关键字
    /// </summary>
    [Keyword("axis", KeywordContexts.Metadata)]
    AxisKeywordToken,

    /// <summary>
    ///     usagetype 关键字
    /// </summary>
    [Keyword("usagetype", KeywordContexts.Metadata)]
    UsageTypeKeywordToken,

    /// <summary>
    ///     helperfields 关键字
    /// </summary>
    [Keyword("helperfields", KeywordContexts.Metadata)]
    HelperFieldsKeywordToken,

    /// <summary>
    ///     precision 关键字
    /// </summary>
    [Keyword("precision", KeywordContexts.Metadata)]
    PrecisionKeywordToken,

    /// <summary>
    ///     rotate 关键字
    /// </summary>
    [Keyword("rotate", KeywordContexts.Metadata)]
    RotateKeywordToken,

    /// <summary>
    ///     rot 关键字
    /// </summary>
    [Keyword("rot", KeywordContexts.Metadata)]
    RotKeywordToken,

    /// <summary>
    ///     randomize 关键字
    /// </summary>
    [Keyword("randomize", KeywordContexts.Metadata)]
    RandomizeKeywordToken,

    /// <summary>
    ///     ran 关键字
    /// </summary>
    [Keyword("ran", KeywordContexts.Metadata)]
    RanKeywordToken,

    /// <summary>
    ///     reverse 关键字
    /// </summary>
    [Keyword("reverse", KeywordContexts.Metadata)]
    ReverseKeywordToken,

    /// <summary>
    ///     rev 关键字
    /// </summary>
    [Keyword("rev", KeywordContexts.Metadata)]
    RevKeywordToken,

    /// <summary>
    ///     ascending 关键字
    /// </summary>
    [Keyword("ascending", KeywordContexts.Metadata)]
    AscendingKeywordToken,

    /// <summary>
    ///     asc 关键字
    /// </summary>
    [Keyword("asc", KeywordContexts.Metadata)]
    AscKeywordToken,

    /// <summary>
    ///     descending 关键字
    /// </summary>
    [Keyword("descending", KeywordContexts.Metadata)]
    DescendingKeywordToken,

    /// <summary>
    ///     desc 关键字
    /// </summary>
    [Keyword("desc", KeywordContexts.Metadata)]
    DescKeywordToken,

    /// <summary>
    ///     namespace 关键字
    /// </summary>
    [Keyword("namespace", KeywordContexts.Metadata)]
    NamespaceKeywordToken,

    /// <summary>
    ///     use 关键字
    /// </summary>
    [Keyword("use", KeywordContexts.Metadata)]
    UseKeywordToken,

    /// <summary>
    ///     sublist 关键字
    /// </summary>
    [Keyword("sublist", KeywordContexts.Metadata)]
    SublistKeywordToken,

    /// <summary>
    ///     exclusive 关键字
    /// </summary>
    [Keyword("exclusive", KeywordContexts.Metadata)]
    ExclusiveKeywordToken,

    /// <summary>
    ///     factor 关键字
    /// </summary>
    [Keyword("factor", KeywordContexts.Metadata)]
    FactorKeywordToken,

    /// <summary>
    ///     keycode 关键字
    /// </summary>
    [Keyword("keycode", KeywordContexts.Metadata)]
    KeycodeKeywordToken,

    /// <summary>
    ///     fix 关键字
    /// </summary>
    [Keyword("fix", KeywordContexts.Metadata)]
    FixKeywordToken,

    /// <summary>
    ///     canfilter 关键字
    /// </summary>
    [Keyword("canfilter", KeywordContexts.Metadata)]
    CanFilterKeywordToken,

    /// <summary>
    ///     nofilter 关键字
    /// </summary>
    [Keyword("nofilter", KeywordContexts.Metadata)]
    NoFilterKeywordToken,

    /// <summary>
    ///     other 关键字
    /// </summary>
    [Keyword("other", KeywordContexts.Metadata)]
    OtherKeywordToken,

    /// <summary>
    ///     multiplier 关键字
    /// </summary>
    [Keyword("multiplier", KeywordContexts.Metadata)]
    MultiplierKeywordToken,

    /// <summary>
    ///     elementtype 关键字
    /// </summary>
    [Keyword("elementtype", KeywordContexts.Metadata)]
    ElementTypeKeywordToken,

    /// <summary>
    ///     dk 关键字
    /// </summary>
    [Keyword("dk", KeywordContexts.Metadata)]
    DontKnowKeywordToken,

    /// <summary>
    ///     ref 关键字
    /// </summary>
    [Keyword("ref", KeywordContexts.Metadata)]
    RefuseKeywordToken,

    /// <summary>
    ///     na 关键字
    /// </summary>
    [Keyword("na", KeywordContexts.Metadata)]
    NoAnswerKeywordToken,

    /// <summary>
    ///     fields 关键字
    /// </summary>
    [Keyword("fields", KeywordContexts.Metadata)]
    FieldsKeywordToken,

    /// <summary>
    ///     row 关键字
    /// </summary>
    [Keyword("row", KeywordContexts.Metadata)]
    RowKeywordToken,

    /// <summary>
    ///     column 关键字
    /// </summary>
    [Keyword("column", KeywordContexts.Metadata)]
    ColumnKeywordToken,

    /// <summary>
    ///     expand 关键字
    /// </summary>
    [Keyword("expand", KeywordContexts.Metadata)]
    ExpandKeywordToken,

    /// <summary>
    ///     noexpand 关键字
    /// </summary>
    [Keyword("noexpand", KeywordContexts.Metadata)]
    NoExpandKeywordToken,

    /// <summary>
    ///     grid 关键字
    /// </summary>
    [Keyword("grid", KeywordContexts.Metadata)]
    GridKeywordToken,

    /// <summary>
    ///     inline 关键字
    /// </summary>
    [Keyword("inline", KeywordContexts.Metadata)]
    InlineKeywordToken,

    /// <summary>
    ///     lcl 关键字
    /// </summary>
    [Keyword("lcl", KeywordContexts.Metadata)]
    LclKeywordToken,

    /// <summary>
    ///     scale 关键字
    /// </summary>
    [Keyword("scale", KeywordContexts.Metadata)]
    ScaleKeywordToken,

    /// <summary>
    ///     标识符
    /// </summary>
    [Token("标识符")]
    Identifier,

    /// <summary>
    ///     预处理宏定义关键字
    /// </summary>
    [Keyword("#define", KeywordContexts.Preprocessor)]
    PreDefineKeywordToken,

    /// <summary>
    ///     预处理器 #undef 关键字
    /// </summary>
    [Keyword("#undef", KeywordContexts.Preprocessor)]
    PreUndefKeywordToken,

    /// <summary>
    ///     预处理器文件引入关键字
    /// </summary>
    [Keyword("#include", KeywordContexts.Preprocessor)]
    PreIncludeKeywordToken,

    /// <summary>
    ///     预处理器 #if 关键字
    /// </summary>
    [Keyword("#if", KeywordContexts.Preprocessor)]
    PreIfKeywordToken,

    /// <summary>
    ///     预处理器 #ifdef 关键字
    /// </summary>
    [Keyword("#ifdef", KeywordContexts.Preprocessor)]
    PreIfDefKeywordToken,

    /// <summary>
    ///     预处理器 #ifndef 关键字
    /// </summary>
    [Keyword("#ifndef", KeywordContexts.Preprocessor)]
    PreIfNDefKeywordToken,

    /// <summary>
    ///     预处理器 #elif 关键字
    /// </summary>
    [Keyword("#elif", KeywordContexts.Preprocessor)]
    PreElIfKeywordToken,

    /// <summary>
    ///     预处理器 #else 关键字
    /// </summary>
    [Keyword("#else", KeywordContexts.Preprocessor)]
    PreElseKeywordToken,

    /// <summary>
    ///     预处理器 #endif 关键字
    /// </summary>
    [Keyword("#endif", KeywordContexts.Preprocessor)]
    PreEndIfKeywordToken,

    /// <summary>
    ///     预处理器 #line 关键字
    /// </summary>
    [Keyword("#line", KeywordContexts.Preprocessor)]
    PreLineKeywordToken,

    /// <summary>
    ///     预处理器 #error 关键字
    /// </summary>
    [Keyword("#error", KeywordContexts.Preprocessor)]
    PreErrorKeywordToken,

    /// <summary>
    ///     预处理器 defined 关键字
    /// </summary>
    [Keyword("defined", KeywordContexts.Preprocessor)]
    PreDefinedKeywordToken,

    /// <summary>
    ///     整数
    /// </summary>
    [Token("整数")]
    Integer,

    /// <summary>
    ///     小数
    /// </summary>
    [Token("小数")]
    Double,

    /// <summary>
    ///     字符串
    /// </summary>
    [Token("字符串")]
    String,

    /// <summary>
    ///     布尔值常量
    /// </summary>
    Boolean,

    /// <summary>
    ///     分类值常量
    /// </summary>
    Category,

    /// <summary>
    ///     分类集合常量
    /// </summary>
    Categorical,

    /// <summary>
    ///     Null 常量
    /// </summary>
    Null,

    /// <summary>
    ///     空表达式
    /// </summary>
    EmptyExpression,

    /// <summary>
    ///     一元表达式
    /// </summary>
    UnaryExpression,

    /// <summary>
    ///     二元表达式
    /// </summary>
    BinaryExpression,

    /// <summary>
    ///     赋值表达式
    /// </summary>
    AssignmentExpression,

    /// <summary>
    ///     成员调用表达式
    /// </summary>
    MemberExpression,

    /// <summary>
    ///     索引表达式
    /// </summary>
    IndexExpression,
    
    /// <summary>
    ///     数字区间表达式， LeftBound To RightBound
    /// </summary>
    RangeExpression,

    /// <summary>
    ///     对象集合迭代器
    /// </summary>
    ObjectCollectionIteration,

    /// <summary>
    ///     表达式的参数列表
    /// </summary>
    ArgumentList,

    /// <summary>
    ///     函数或方法调用表达式
    /// </summary>
    CallExpression,

    /// <summary>
    ///     预处理器 defined macro_name 或 defined(macro_name) 表达式
    /// </summary>
    PreDefinedExpression,

    /// <summary>
    ///     预处理器 #include 语句
    /// </summary>
    FileInclude,

    /// <summary>
    ///     宏字符串化表达式，# Stringizer
    /// </summary>
    MacroStringizer,

    /// <summary>
    ///     标识符粘贴表达式，LEFT ## RIGHT
    /// </summary>
    MacroTokenPaster,

    /// <summary>
    ///     参数宏调用时传入的参数
    /// </summary>
    MacroArgument,

    /// <summary>
    ///     参数宏参数列表
    /// </summary>
    MacroArgumentList,

    /// <summary>
    ///     宏扩展
    /// </summary>
    MacroExpansion,

    /// <summary>
    ///     参数宏调用表达式
    /// </summary>
    MacroCallExpression,

    /// <summary>
    ///     宏定义
    /// </summary>
    MacroDeclaration,

    /// <summary>
    ///     参数宏的参数定义
    /// </summary>
    MacroParameterDeclaration,

    /// <summary>
    ///     参数宏参数定义列表
    /// </summary>
    MacroParameterList,

    /// <summary>
    ///     变量声明
    /// </summary>
    VariableDeclaration,

    /// <summary>
    ///     数组声明
    /// </summary>
    ArrayDeclaration,

    /// <summary>
    ///     常量声明
    /// </summary>
    ConstantDeclaration,

    /// <summary>
    ///     函数声明
    /// </summary>
    FunctionDeclaration,

    /// <summary>
    ///     类签名
    /// </summary>
    ClassSignature,

    /// <summary>
    ///     接口签名
    /// </summary>
    InterfaceSignature,

    /// <summary>
    ///     属性签名
    /// </summary>
    PropertySignature,

    /// <summary>
    ///     类方法签名
    /// </summary>
    MethodSignature,

    /// <summary>
    ///     函数签名
    /// </summary>
    FunctionSignature,

    /// <summary>
    ///     枚举签名
    /// </summary>
    EnumSignature,

    /// <summary>
    ///     枚举成员签名
    /// </summary>
    EnumMemberSignature,

    /// <summary>
    ///     常量签名
    /// </summary>
    ConstantSignature,

    /// <summary>
    ///     模块签名
    /// </summary>
    ModuleSignature,

    /// <summary>
    ///     参数签名
    /// </summary>
    ParameterSignature,

    /// <summary>
    ///     类型绑定，As TypeName，只能在声明文件中使用。
    /// </summary>
    TypeBinding,

    /// <summary>
    ///     完全限定名
    /// </summary>
    QualifiedName,

    /// <summary>
    ///     行标签，用作Goto语句
    /// </summary>
    Label,

    //  元数据声明类型

    /// <summary>
    ///     元数据地区语言、上下文类型定义
    /// </summary>
    MetadataAreaName,

    /// <summary>
    ///     元数据附加属性定义
    /// </summary>
    MetadataProperty,

    /// <summary>
    ///     元数据附加属性集合
    /// </summary>
    MetadataProperties,

    /// <summary>
    ///     元数据模板属性定义
    /// </summary>
    MetadataTemplate,

    /// <summary>
    ///     元数据模板配置列表
    /// </summary>
    MetadataTemplates,

    /// <summary>
    ///     元数据文本描述
    /// </summary>
    MetadataLabel,

    /// <summary>
    ///     元数据的样式属性定义
    /// </summary>
    MetadataStyle,

    /// <summary>
    ///     元数据样式定义
    /// </summary>
    MetadataStyles,

    /// <summary>
    ///     元数据表达式定义
    /// </summary>
    MetadataExpression,

    /// <summary>
    ///     元数据KeyCodes定义
    /// </summary>
    MetadataKeyCode,

    /// <summary>
    ///     元数据轴表达式定义
    /// </summary>
    MetadataAxis,

    /// <summary>
    ///     元数据分类元素类型定义
    /// </summary>
    MetadataElementType,

    /// <summary>
    ///     元数据分类元素系数定义
    /// </summary>
    MetadataFactor,

    /// <summary>
    ///     元数据乘数变量定义
    /// </summary>
    MetadataMultiplier,

    /// <summary>
    ///     元数据其他变量定义
    /// </summary>
    MetadataOther,

    /// <summary>
    ///     元数据列表引用
    /// </summary>
    MetadataListReference,

    /// <summary>
    ///     元数据子列表定义
    /// </summary>
    MetadataSublist,

    /// <summary>
    ///     元数据精度定义
    /// </summary>
    MetadataPrecision,

    /// <summary>
    ///     元数据数据长度定义
    /// </summary>
    MetadataScale,

    /// <summary>
    ///     元数据有效值检验定义
    /// </summary>
    MetadataValidation,

    /// <summary>
    ///     元数据初始值定义
    /// </summary>
    MetadataInitialAnswer,

    /// <summary>
    ///     元数据默认值定义
    /// </summary>
    MetadataDefaultAnswer,

    /// <summary>
    ///     元数据字段用途定义
    /// </summary>
    MetadataUsageType,

    /// <summary>
    ///     元数据帮助字段集合定义
    /// </summary>
    MetadataHelperFields,

    /// <summary>
    ///     元数据分类元素列表定义
    /// </summary>
    MetadataCategories,

    /// <summary>
    ///     数据库字段属性配置中的Column定义
    /// </summary>
    MetadataDbColumns,

    /// <summary>
    ///     数据库字段的特有属性定义
    /// </summary>
    MetadataDbProperties,

    /// <summary>
    ///     元数据字段定义
    /// </summary>
    MetadataField,

    /// <summary>
    ///     元数据值区间定义
    /// </summary>
    MetadataFieldValueRange,


    /// <summary>
    ///     [] 元数据值区间列表
    /// </summary>
    MetadataFieldValueRangeList,

    /// <summary>
    ///     元数据次级字段集合定义
    /// </summary>
    MetadataClass,

    /// <summary>
    ///     元数据字段引用，use "field-name"
    /// </summary>
    MetadataFieldReference,

    /// <summary>
    ///     在文件头部起到标记作用的注释语句
    /// </summary>
    Directive,

    /// <summary>
    ///     语句块
    /// </summary>
    Block,

    /// <summary>
    ///     在 Parser 中替代 FileInclude 将语法树引入文件的语法节点
    /// </summary>
    SyntaxTreeInclude,

    /// <summary>
    ///     变量声明语句
    /// </summary>
    DimStatement,

    /// <summary>
    ///     表达式语句
    /// </summary>
    ExpressionStatement,

    /// <summary>
    ///     If 语句
    /// </summary>
    IfStatement,

    /// <summary>
    ///     For 语句
    /// </summary>
    ForStatement,

    /// <summary>
    ///     For Each 语句
    /// </summary>
    ForEachStatement,

    /// <summary>
    ///     While 语句
    /// </summary>
    WhileStatement,

    /// <summary>
    ///     Do 语句
    /// </summary>
    DoStatement,

    /// <summary>
    ///     With 语句
    /// </summary>
    WithStatement,

    /// <summary>
    ///     Select Case 语句分支比较表达式
    /// </summary>
    SelectCaseComparision,

    /// <summary>
    ///     Select Case 语句分支
    /// </summary>
    SelectCaseClause,

    /// <summary>
    ///     Select 语句
    /// </summary>
    SelectStatement,

    /// <summary>
    ///     Section 语句块
    /// </summary>
    SectionStatement,

    /// <summary>
    ///     Goto 语句
    /// </summary>
    GotoStatement,

    /// <summary>
    ///     Resume 语句
    /// </summary>
    ResumeStatement,

    /// <summary>
    ///     Exit 语句
    /// </summary>
    ExitStatement,

    /// <summary>
    ///     On Error 语句
    /// </summary>
    OnErrorStatement,

    /// <summary>
    ///     Option [Explicit | Implicit | GlobalVariable]
    /// </summary>
    OptionStatement,

    /// <summary>
    ///     DMS Event 语句块
    /// </summary>
    EventSection,

    /// <summary>
    ///     DMS Metadata Section 语句块
    /// </summary>
    MetadataSection,

    /// <summary>
    ///     DMS Section 属性
    /// </summary>
    DmsProperty,

    /// <summary>
    ///     DMS Job 语句块
    /// </summary>
    JobSection,

    /// <summary>
    ///     DMS InputDataSource Section 语句块
    /// </summary>
    InputDataSourceSection,

    /// <summary>
    ///     DMS OutputDataSource Section 语句块
    /// </summary>
    OutputDataSourceSection,

    /// <summary>
    ///     DMS GlobalSqlVariables Section 语句块
    /// </summary>
    GlobalSqlVariablesSection,

    /// <summary>
    ///     DMS Logging Section 语句块
    /// </summary>
    LoggingSection,

    /// <summary>
    ///     DMS Routing Section 语句块
    /// </summary>
    RoutingSection,

    /// <summary>
    ///     预处理器 #if 语句
    /// </summary>
    PreIfStatement,

    /// <summary>
    ///     预处理扩展后的文件对象
    /// </summary>
    ProcessedFile,

    /// <summary>
    ///     语法树
    /// </summary>
    SyntaxTree
}